home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / sound / sox4d.zip / SOX.TXT < prev    next >
Text File  |  1992-04-16  |  15KB  |  397 lines

  1.  
  2.  
  3.  
  4. SOX(1)              UNIX Programmer's Manual               SOX(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      sox - SOund eXchange - universal sound sample translator
  10.  
  11. SYNOPSIS
  12.      sox _i_n_f_i_l_e _o_u_t_f_i_l_e
  13.      sox _i_n_f_i_l_e _o_u_t_f_i_l_e [ _e_f_f_e_c_t [ _e_f_f_e_c_t _o_p_t_i_o_n_s ... ] ]
  14.      sox _i_n_f_i_l_e -e _e_f_f_e_c_t [ _e_f_f_e_c_t _o_p_t_i_o_n_s ... ]
  15.      sox [ _g_e_n_e_r_a_l _o_p_t_i_o_n_s  ] [ _f_o_r_m_a_t _o_p_t_i_o_n_s  ] _i_f_i_l_e [ _f_o_r_m_a_t
  16.      _o_p_t_i_o_n_s  ] _o_f_i_l_e [ _e_f_f_e_c_t [ _e_f_f_e_c_t _o_p_t_i_o_n_s ... ] ]
  17.      _G_e_n_e_r_a_l _o_p_t_i_o_n_s: [ -V ] [ -v _v_o_l_u_m_e ]
  18.      _F_o_r_m_a_t _o_p_t_i_o_n_s: [ -t _f_i_l_e_t_y_p_e ] [ -r _r_a_t_e ] [ -s/-u/-U/-A ]
  19.      [ -b/-w/-l/-f/-d/-D ] [ -c _c_h_a_n_n_e_l_s ] [ -x ]
  20.      _E_f_f_e_c_t_s:
  21.           copy
  22.           rate
  23.           avg
  24.           stat
  25.           echo _d_e_l_a_y _v_o_l_u_m_e [ _d_e_l_a_y _v_o_l_u_m_e ... ]
  26.           vibro _s_p_e_e_d [ _d_e_p_t_h ]
  27.           lowp _c_e_n_t_e_r
  28.           band [ -_n ] _c_e_n_t_e_r [ _w_i_d_t_h ]
  29.  
  30. DESCRIPTION
  31.      _S_o_x translates sound files from one format to another, pos-
  32.      sibly doing a sound effect.
  33.  
  34. OPTIONS
  35.      The option syntax is a little grotty, but in essence:
  36.           sox file.au file.voc
  37.      translates a sound sample in SUN Sparc .AU format into a
  38.      SoundBlaster .VOC file, while
  39.           sox -v 0.5 file.au -rate 12000 file.voc rate
  40.      does the same format translation but also lowers the ampli-
  41.      tude by 1/2 and changes the sampling rate from 8000 hertz to
  42.      12000 hertz via the rate _s_o_u_n_d _e_f_f_e_c_t loop.
  43.  
  44.      File type options:
  45.  
  46.      -t _f_i_l_e_t_y_p_e
  47.                gives the type of the sound sample file.
  48.  
  49.      -r _r_a_t_e   Give sample rate in Hertz of file.
  50.  
  51.      -s/-u/-U/-A
  52.                The sample data is signed linear (2's complement),
  53.                unsigned linear, U-law (logarithmic), or A-law
  54.                (logarithmic).  U-law and A-law are the U.S. and
  55.                international standards for logarithmic telephone
  56.                sound compression.
  57.  
  58.      -b/-w/-l/-f/-d/-D
  59.                The sample data is in bytes, 16-bit words, 32-bit
  60.  
  61.  
  62.  
  63. Printed 4/16/92                                                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SOX(1)              UNIX Programmer's Manual               SOX(1)
  71.  
  72.  
  73.  
  74.                longwords, 32-bit floats, 64-bit double floats, or
  75.                80-bit IEEE floats.  Floats and double floats are
  76.                in native machine format.
  77.  
  78.      -x        The sample data is in XINU format; that is, it
  79.                comes from a machine with the opposite word order
  80.                than yours and must be swapped according to the
  81.                word-size given above.  Only 16-bit and 32-bit
  82.                integer data may be swapped.  Machine-format
  83.                floating-point data is not portable.  IEEE floats
  84.                are a fixed, portable format. ???
  85.  
  86.      -c _c_h_a_n_n_e_l_s
  87.                The number of sound channels in the data file.
  88.                This may be 1, 2, or 4; for mono, stereo, or quad
  89.                sound data.
  90.  
  91.      General options:
  92.  
  93.      -e        after the input file allows you to avoid giving an
  94.                output file and just name an effect.  This is only
  95.                useful with the stat effect.
  96.  
  97.      -v _v_o_l_u_m_e Change amplitude (floating point); less than 1.0
  98.                decreases, greater than 1.0 increases.  Note: we
  99.                perceive volume logarithmically, not linearly.
  100.                Note: see the stat effect.
  101.  
  102.      -V        Print a description of processing phases.  Useful
  103.                for figuring out exactly how _s_o_x is mangling your
  104.                sound samples.
  105.  
  106.      The input and output files may be standard input and output.
  107.      This is specified by '-'.  The -t _t_y_p_e option must be given
  108.      in this case, else _s_o_x will not know the format of the given
  109.      file.  The -t, -r, -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x
  110.      options refer to the input data when given before the input
  111.      file name.  After, they refer to the output data.
  112.  
  113.      If you don't give an output file name, _s_o_x will just read
  114.      the input file.  This is useful for validating structured
  115.      file formats; the stat effect may also be used via the -e
  116.      option.
  117.  
  118. FILE TYPES
  119.      _S_o_x needs to know the formats of the input and output files.
  120.      File formats which have headers are checked, if that header
  121.      doesn't seem right, the program exits with an appropriate
  122.      message.  Currently, the raw (no header), IRCAM Sound Files,
  123.      Sound Blaster, SPARC .AU (w/header), Mac HCOM, PC/DOS .SOU,
  124.      Sndtool, and Sounder, NeXT .SND, and Amiga/SGI AIFF and 8SVX
  125.      formats are supported.
  126.  
  127.  
  128.  
  129. Printed 4/16/92                                                 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SOX(1)              UNIX Programmer's Manual               SOX(1)
  137.  
  138.  
  139.  
  140.      .aiff     AIFF files used on Amiga and SGI.  Note: the AIFF
  141.                format supports only one SSND chunk.  It does not
  142.                support multiple sound chunks, or the 8SVX musical
  143.                instrument description format.  AIFF files are
  144.                multimedia archives and and can have multiple
  145.                audio and picture chunks.  You may need a separate
  146.                archiver to work with them.
  147.  
  148.      .au       SUN Microsystems AU files.  There are apparently
  149.                many types of .au files; DEC has invented its own
  150.                with a different magic number and word order. The
  151.                .au handler can read these files but will not
  152.                write them.  Some .au files have valid AU headers
  153.                and some do not.  The latter are probably original
  154.                SUN u-law 8000 hz samples.  These can be dealt
  155.                with using the .ul format (see below).
  156.  
  157.      .hcom     Macintosh HCOM files.  These are (apparently) Mac
  158.                FSSD files with some variant of Huffman compres-
  159.                sion.  The Macintosh has wacky file formats and
  160.                this format handler apparently doesn't handle all
  161.                the ones it should.  Mac users will need your
  162.                usual arsenal of file converters to deal with an
  163.                HCOM file under Unix or DOS.
  164.  
  165.      .raw      Raw files (no header).
  166.                The sample rate, size (byte, word, etc), and style
  167.                (signed, unsigned, etc.) of the sample file must
  168.                be given.  The number of channels defaults to 1.
  169.  
  170.      .ub, .sb, .uw, .sw, .ul
  171.                These are several suffices which serve as a short-
  172.                hand for raw files with a given size and style.
  173.                Thus, ub, sb, uw, sw, and ul correspond to
  174.                "unsigned byte", "signed byte", "unsigned word",
  175.                "signed word", and "ulaw" (byte).  The sample rate
  176.                defaults to 8000 hz if not explicitly set, and the
  177.                number of channels (as always) defaults to 1.
  178.                There are lots of Sparc samples floating around in
  179.                u-law format with no header and fixed at a sample
  180.                rate of 8000 hz.  (Certain sound management
  181.                software cheerfully ignores the headers.) Simi-
  182.                larly, most Mac sound files are in unsigned byte
  183.                format with a sample rate of 11025 or 22050 hz.
  184.  
  185.      .sf       IRCAM Sound Files.
  186.                SoundFiles are used by academic music software
  187.                such as the CSound package, and the MixView sound
  188.                sample editor.
  189.  
  190.      .voc      Sound Blaster VOC files.
  191.                VOC files are multi-part and contain silence
  192.  
  193.  
  194.  
  195. Printed 4/16/92                                                 3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SOX(1)              UNIX Programmer's Manual               SOX(1)
  203.  
  204.  
  205.  
  206.                parts, looping, and different sample rates for
  207.                different chunks.  On input, the silence parts are
  208.                filled out, loops are rejected, and sample data
  209.                with a new sample rate is rejected.  Silence with
  210.                a different sample rate is generated appropri-
  211.                ately.  On output, silence is not detected, nor
  212.                are impossible sample rates.
  213.  
  214. EFFECTS
  215.      Only one effect from the palette may be applied to a sound
  216.      sample.  To do multiple effects you'll need to run _s_o_x in a
  217.      pipeline.
  218.  
  219.      copy                          Copy the input file to the
  220.                                    output file.  This is the
  221.                                    default effect if both files
  222.                                    have the same sampling rate,
  223.                                    or the rates are "close".
  224.  
  225.      rate                          Translate input sampling rate
  226.                                    to output sampling rate via
  227.                                    linear interpolation to the
  228.                                    Least Common Multiple of the
  229.                                    two sampling rates.  This is
  230.                                    the default effect if the two
  231.                                    files have different sampling
  232.                                    rates.  This is fast but
  233.                                    noisy.
  234.  
  235.      avg                           Mix 4- or 2-channel sound file
  236.                                    into 2- or 1-channel file by
  237.                                    averaging the samples for dif-
  238.                                    ferent speakers.
  239.  
  240.      stat                          Do a statistical check on the
  241.                                    input file, and print results
  242.                                    on the standard error file.
  243.                                    stat may copy the file
  244.                                    untouched from input to out-
  245.                                    put, if you select an output
  246.                                    file. The "Volume Adjustment:"
  247.                                    field in the statistics gives
  248.                                    you the argument to the -v
  249.                                    _n_u_m_b_e_r which will make the
  250.                                    sample as loud as possible.
  251.  
  252.      echo [ _d_e_l_a_y _v_o_l_u_m_e ...  ]    Add echoing to a sound sample.
  253.                                    Each delay/volume pair gives
  254.                                    the delay in seconds and the
  255.                                    volume (relative to 1.0) of
  256.                                    that echo.  If the volumes add
  257.                                    up to more than 1.0, the sound
  258.  
  259.  
  260.  
  261. Printed 4/16/92                                                 4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SOX(1)              UNIX Programmer's Manual               SOX(1)
  269.  
  270.  
  271.  
  272.                                    will melt down instead of fad-
  273.                                    ing away.
  274.  
  275.      vibro _s_p_e_e_d  [ _d_e_p_t_h ]        Add the world-famous Fender
  276.                                    Vibro-Champ sound effect to a
  277.                                    sound sample by using a sine
  278.                                    wave as the volume knob.
  279.                                    Speed gives the Hertz value of
  280.                                    the wave.  This must be under
  281.                                    30.  Depth gives the amount
  282.                                    the volume is cut into by the
  283.                                    sine wave, ranging 0.0 to 1.0
  284.                                    and defaulting to 0.5.
  285.  
  286.      lowp _c_e_n_t_e_r                   Apply a low-pass filter.  The
  287.                                    frequency response drops loga-
  288.                                    rithmically with _c_e_n_t_e_r fre-
  289.                                    quency in the middle of the
  290.                                    drop.  The slope of the filter
  291.                                    is quite gentle.
  292.  
  293.      band [ -_n ] _c_e_n_t_e_r [ _w_i_d_t_h ]  Apply a band-pass filter.  The
  294.                                    frequency response drops loga-
  295.                                    rithmically around the _c_e_n_t_e_r
  296.                                    frequency.  The _w_i_d_t_h gives
  297.                                    the slope of the drop.  The
  298.                                    frequencies at _c_e_n_t_e_r + _w_i_d_t_h
  299.                                    and _c_e_n_t_e_r - _w_i_d_t_h will be
  300.                                    half of their original ampli-
  301.                                    tudes.  Band defaults to a
  302.                                    mode oriented to pitched sig-
  303.                                    nals, i.e. voice, singing, or
  304.                                    instrumental music.  The -_n
  305.                                    (for noise) option uses the
  306.                                    alternate mode for un-pitched
  307.                                    signals.  Band introduces
  308.                                    noise in the shape of the
  309.                                    filter, i.e. peaking at the
  310.                                    _c_e_n_t_e_r frequency and settling
  311.                                    around it.
  312.  
  313.      _S_o_x enforces certain effects.  If the two files have dif-
  314.      ferent sampling rates, the requested effect must be one of
  315.      copy, or rate, If the two files have different numbers of
  316.      channels, the avg effect must be requested.
  317.  
  318. BUGS
  319.      The syntax is horrific.  It's very tempting to include a
  320.      default system that allows an effect name as the program
  321.      name and just pipes a sound sample from standard input to
  322.      standard output, but the problem of inputting the sample
  323.      rates makes this unworkable.
  324.  
  325.  
  326.  
  327. Printed 4/16/92                                                 5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SOX(1)              UNIX Programmer's Manual               SOX(1)
  335.  
  336.  
  337.  
  338. FILES
  339. SEE ALSO
  340. NOTICES
  341.      The echoplex effect is:
  342.          Copyright (C) 1989 by Jef Poskanzer.
  343.          Permission to use, copy, modify, and distribute this
  344.      software and its
  345.          documentation for any purpose and without fee is hereby
  346.      granted, provided
  347.          that the above copyright notice appear in all copies and
  348.      that both that
  349.          copyright notice and this permission notice appear in
  350.      supporting
  351.          documentation.  This software is provided "as is"
  352.      without express or
  353.          implied warranty.
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Printed 4/16/92                                                 6
  394.  
  395.  
  396.  
  397.